<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:page="urn:page">
  <xsl:param name="param"/>
  <xsl:param name="templatename"/>
  <xsl:output method="html" encoding="utf-8"/>
  <xsl:template match="/">
    <xsl:if test="$templatename='轮播广告' or $templatename='焦点广告' or $templatename='顶部轮播广告'">
      <div id="SlidePlayer">
        <ul class="Slides">
          <xsl:for-each select="rows/row">
            <li><a target="_blank" title="{F_Title}" href="{F_Url}"><IMG border="0">
              <xsl:attribute name="src"><xsl:value-of select="F_Image"/></xsl:attribute>
              </IMG></a></li>
          </xsl:for-each>
        </ul>
      </div>
      <script type="text/javascript">
			new PG.SWFPlayer('SlidePlayer',<xsl:value-of select="substring($param,1,3)"/>,<xsl:value-of select="substring($param,4,3)"/>);
</script>
    </xsl:if>
    <xsl:if test="$templatename!='轮播广告' and $templatename!='焦点广告' and $templatename!='顶部轮播广告'">
      <xsl:for-each select="rows/row">
        <xsl:if test="$templatename='广告位二A'">
          <xsl:if test="position()=1">
            <xsl:text disable-output-escaping="yes">&lt;div class="floatleft"&gt;</xsl:text>
          </xsl:if>
          <xsl:if test="position()=2">
            <xsl:text disable-output-escaping="yes">&lt;div class="floatright"&gt;</xsl:text>
          </xsl:if>
        </xsl:if>
        <xsl:if test="$templatename!='广告位二A' and $templatename!='广告位一'">
          <xsl:text disable-output-escaping="yes">&lt;div class="adcss"&gt;</xsl:text>
          <!--m7 广告位18-->
        </xsl:if>
        <xsl:choose>
          <xsl:when test="F_Type=0">
            <!--文本链接-->
            <a target="_blank" title="{F_Title}" href="{F_Url}"><xsl:value-of select="F_Title"/></a>
          </xsl:when>
          <xsl:when test="F_Type=1">
            <!--图片-->
            <a target="_blank" title="{F_Title}" href="{F_Url}"><img border="0" src="{F_Image}"/></a>
          </xsl:when>
          <xsl:when test="F_Type=2">
            <!--代码-->
            <xsl:value-of select="F_Image" disable-output-escaping="yes"/>
          </xsl:when>
        </xsl:choose>
        <xsl:if test="$templatename!='广告位一'">
          <xsl:text disable-output-escaping="yes"> &lt;/div&gt;</xsl:text>
        </xsl:if>
      </xsl:for-each>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>
